.class Lcom/noshufou/android/su/UpdaterFragment$ConsoleAdapter;
.super Landroid/widget/ArrayAdapter;
.source "UpdaterFragment.java"


# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Lcom/noshufou/android/su/UpdaterFragment;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x2
    name = "ConsoleAdapter"
.end annotation

.annotation system Ldalvik/annotation/Signature;
    value = {
        "Landroid/widget/ArrayAdapter",
        "<",
        "Lcom/noshufou/android/su/UpdaterFragment$ConsoleEntry;",
        ">;"
    }
.end annotation


# instance fields
.field final synthetic this$0:Lcom/noshufou/android/su/UpdaterFragment;


# direct methods
.method constructor <init>(Lcom/noshufou/android/su/UpdaterFragment;Landroid/content/Context;)V
    .locals 1
    .parameter
    .parameter "context"

    .prologue
    .line 829
    iput-object p1, p0, Lcom/noshufou/android/su/UpdaterFragment$ConsoleAdapter;->this$0:Lcom/noshufou/android/su/UpdaterFragment;

    .line 830
    const v0, 0x7f030008

    invoke-direct {p0, p2, v0}, Landroid/widget/ArrayAdapter;-><init>(Landroid/content/Context;I)V

    .line 831
    return-void
.end method


# virtual methods
.method public getView(ILandroid/view/View;Landroid/view/ViewGroup;)Landroid/view/View;
    .locals 7
    .parameter "position"
    .parameter "convertView"
    .parameter "parent"

    .prologue
    .line 835
    invoke-super {p0, p1, p2, p3}, Landroid/widget/ArrayAdapter;->getView(ILandroid/view/View;Landroid/view/ViewGroup;)Landroid/view/View;

    move-result-object v2

    check-cast v2, Landroid/widget/TextView;

    .line 836
    .local v2, view:Landroid/widget/TextView;
    invoke-virtual {p0, p1}, Lcom/noshufou/android/su/UpdaterFragment$ConsoleAdapter;->getItem(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/noshufou/android/su/UpdaterFragment$ConsoleEntry;

    .line 838
    .local v0, entry:Lcom/noshufou/android/su/UpdaterFragment$ConsoleEntry;
    invoke-virtual {v2}, Landroid/widget/TextView;->getText()Ljava/lang/CharSequence;

    move-result-object v1

    check-cast v1, Landroid/text/Spannable;

    .line 839
    .local v1, str:Landroid/text/Spannable;
    new-instance v3, Landroid/text/style/ForegroundColorSpan;

    iget v4, v0, Lcom/noshufou/android/su/UpdaterFragment$ConsoleEntry;->statusColor:I

    invoke-direct {v3, v4}, Landroid/text/style/ForegroundColorSpan;-><init>(I)V

    .line 840
    iget-object v4, v0, Lcom/noshufou/android/su/UpdaterFragment$ConsoleEntry;->entry:Ljava/lang/String;

    invoke-virtual {v4}, Ljava/lang/String;->length()I

    move-result v4

    .line 841
    invoke-virtual {v0}, Lcom/noshufou/android/su/UpdaterFragment$ConsoleEntry;->toString()Ljava/lang/String;

    move-result-object v5

    invoke-virtual {v5}, Ljava/lang/String;->length()I

    move-result v5

    .line 842
    const/16 v6, 0x21

    .line 839
    invoke-interface {v1, v3, v4, v5, v6}, Landroid/text/Spannable;->setSpan(Ljava/lang/Object;III)V

    .line 844
    return-object v2
.end method
